package com.hfy.admin.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ author 韩
 * time: 2024/7/8 16:57
 */
@Configuration
public class EsClientConfig {

    @Bean
    public RestHighLevelClient restHighLevelclient() {
        return new RestHighLevelClient(RestClient.builder(
                HttpHost.create("http://139.9.138.158:9200")
        ));
    }
}
